/*
 * Vencord, a modification for Discord's desktop app
 * Copyright (c) 2022 Vendicated and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

.vc-plugins-grid {
    margin-top: 16px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.vc-plugins-info-button {
    height: 24px;
    width: 24px;
    padding: 0;
    background: transparent;
    margin-right: 8px;
    color: var(--icon-secondary);
    transition: background-color .2s ease;

    &:hover {
        color: var(--interactive-hover)
    }
}

.vc-plugins-settings-button:hover {
    color: var(--interactive-hover);
}

.vc-plugins-filter-controls {
    display: grid;
    height: 40px;
    gap: 10px;
    grid-template-columns: 1fr 150px;
}

.vc-addon-badge {
    padding: 0 6px;
    font-family: var(--font-display);
    font-weight: 500;
    border-radius: 8px;
    height: 16px;
    font-size: 12px;
    line-height: 16px;
    color: var(--white-500);
    text-align: center;
    margin-right: 8px;
}

.vc-plugins-dep-name {
    margin: 0 auto;
}

.vc-plugins-info-card {
    padding: 1em;
    height: fit-content;
    display: flex;
    flex-direction: column;
    background-color: var(--background-base-lower-alt) !important;
    transition: 0.1s ease-out;
    transition-property: box-shadow, transform, background, opacity;
    gap: 0.25em;
}

.vc-plugins-restart-card {
    padding: 1em;
    background: var(--info-warning-background);
    border: 1px solid var(--info-warning-foreground);
    color: var(--info-warning-foreground);
}

.vc-plugins-info-icon:not(:hover, :focus) {
    color: var(--text-subtle);
}

.vc-plugins-restart-button {
    background-color: var(--background-base-low) !important;
    border: 1px solid var(--info-warning-foreground) !important;
    margin-top: 0.5em;
}

.vc-plugins-restart-button:hover {
    background-color: var(--info-warning-foreground) !important;
}

.vc-plugin-stats {
    background-color: var(--background-base-lower-alt);
    border-radius: 8px;
    padding: 12px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    transition: 0.1s ease-out;
    transition-property: box-shadow, transform, background, opacity;
}

.vc-plugins-info-card:hover,
.vc-plugin-stats:hover {
    background-color: var(--background-base-low) !important;
    transform: translateY(-1px);
    box-shadow: var(--elevation-high);
}

.vc-plugin-stats-card-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vc-plugin-stats-card-section {
    text-align: center;
    flex: 1;
}

.vc-plugin-stats-card-divider {
    border-left: 1px solid #ccc;
    height: 100%;
    margin: 0 10px;
}

/* Shared styles for warning modal and disable all modal */

.vc-text-selectable {
    user-select: none;
}

.vc-warning-info {
    gap: 15px;
    display: grid !important;
    flex-direction: column;
    user-select: none;
}

.vc-warning-info img {
    width: 70%;
    height: auto;
    display: block;
    margin: auto auto 10px;
}

.vc-warning-info strong {
    font-weight: bold;
}

.text-danger {
    color: var(--text-feedback-critical) !important;
    font-size: 1.2rem;
    font-weight: bold;
}

.text-normal {
    color: var(--text-default);
    font-size: 1.2rem;
}

.text-normal.margin-bottom {
    margin-bottom: 10px;
}

.vc-plugins-disable-warning,
.vc-plugin-modal-disable-warning {
    background-color: color-mix(in srgb, var(--button-danger-background) 10%, transparent) !important;
    border-style: solid !important;
    border-width: .1rem !important;
    border-color: color-mix(in srgb, var(--button-danger-background) 80%, transparent) !important;
    border-radius: 5px !important;
    color: color-mix(in srgb, var(--button-danger-background) 100%, transparent) !important;
}

.vc-plugins-disable-warning:hover,
.vc-plugin-modal-disable-warning:hover {
    background-color: color-mix(in srgb, var(--button-danger-background-hover) 40%, transparent) !important;
}

.vc-plugins-confirm-reset,
.vc-plugin-modal-confirm-reset {
    background-color: var(--button-danger-background) !important;
    color: var(--header-primary);
}

.vc-plugins-confirm-reset:hover,
.vc-plugin-modal-confirm-reset:hover {
    background-color: var(--button-danger-background-hover) !important;
    filter: saturate(80%);
}

.vc-modal-close-button {
    margin-left: auto !important;
}

.vc-modal-align-reset {
    align-self: end;
}

.vc-modal-footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.vc-modal-footer .vc-button-container {
    gap: 10px;
    align-items: center;
    justify-content: space-between !important;
}

/* Specific to disable all modal */

.warning-text {
    color: var(--text-feedback-critical) !important;
    font-size: 1.2rem !important;
}

.warning-text span {
    font-weight: bold;
    text-decoration: underline;
}

.visual-refresh .button-danger-background {
    font-size: 16px;
    background-color: rgb(240 71 71 / 10%) !important;
    color: rgb(240 71 71) !important;
    border: 1px solid rgb(240 71 71 / 60%) !important;
    border-radius: 4px;
    font-weight: 500;
    padding: 6px 10px;
    text-align: center;
}

.visual-refresh .button-danger-background:hover {
    background-color: var(--status-danger-background) !important;
    color: var(--status-danger-text) !important;
}

.visual-refresh .vc-plugins-info-card {
    background-color: var(--card-primary-bg) !important;
    border: 1px solid var(--border-subtle) !important;

    &:hover {
        background-color: var(--card-primary-bg) !important;
    }
}

.visual-refresh .vc-plugin-stats {
    background-color: var(--card-primary-bg) !important;
    border: 1px solid var(--border-subtle) !important;

    &:hover {
        background-color: var(--card-primary-bg) !important;
    }
}

.vc-plugins-settings {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
}

.vc-plugins-page-buttons {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vc-plugins-source {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    margin-right: 8px;
}

.vc-plugins-stats-container {
    margin-top: 16px;
    gap: 16px;
    display: flex;
    flex-direction: row;
    width: 100%;
}

.vc-plugins-ui-elements {
    margin-top: 16px;
}
